import { RouteRecordRaw } from 'vue-router'
import Layout from '@/layout/index.vue'

export const constRouter: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Layout',
    component: Layout,
    redirect: 'home',
    children: [
      {
        path: '/home',
        name: 'home',
        meta: {
          title: '首页'
        },
        component: () => import('@/views/home/home.vue')
      }
    ]
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login/login.vue')
  },
  {
    path: '/error/404',
    name: '404',
    component: () => import('@/views/error/404.vue')
  }
  // {
  //   path: '/:pathMatch(.*)*',
  //   redirect: '/error/404'
  // }
]
